<?php

  abstract class KindCategory extends Category
  {
    public function __construct($name, Dice $dice)
    {
      parent::__construct($name);

      $diceCount = $dice->getValueCount();
      if($diceCount[0] >= $this->getNumToMatch()) {
        $this->score = array_sum($dice->getValues());
      } else {
        $this->score = 0;
      }
    }

    abstract protected function getNumToMatch();
  }